package com.studyroom.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("orders")
public class SnackOrder {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long userId;
    
    private BigDecimal totalAmount;
    
    private Integer status; // 0: 待支付, 1: 已支付, 2: 配送中, 3: 已完成, 4: 已取消
    
    private String deliveryLocation;
    
    private LocalDateTime deliveryTime;
    
    private LocalDateTime createdAt;
    
    private LocalDateTime updatedAt;
    
    @TableField(exist = false)
    private String username;
    
    @TableField(exist = false)
    private List<OrderItem> items;
} 